package com.baidu.unbiz.fluentvalidator.validator;

import com.baidu.unbiz.fluentvalidator.Validator;
import com.baidu.unbiz.fluentvalidator.ValidatorContext;
import com.baidu.unbiz.fluentvalidator.ValidatorHandler;
import com.baidu.unbiz.fluentvalidator.dto.Car;

/**
 * Created by xhuji on 2017/4/15.
 */
public class ComplexValidator extends ValidatorHandler<Car> implements Validator<Car> {

    @Override
    public boolean validate(ValidatorContext context, Car t){
        if (t.getLicensePlate() != null || t.getManufacturer() != null || t.getSeatCount() == 0){
            return true;
        }
        return false;
    }
}
